﻿using System.Collections.Generic;
using Yun.Interface;
using Yun.Response;
using Yun.Util;

namespace Yun.User.Request
{
    /// <summary>
    /// 同步用户密码
    /// yun.user.password.sync
    /// </summary>
    public class SyncUserPasswordRequest :ITopRequest<IntResultResponse>
    {
        /// <summary>
        /// 目标appid
        /// </summary>
        public int TargetAppId { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }

        public string GetApiName()
        {
            return "yun.user.password.sync";
        }

        public IDictionary<string, string> GetParameters()
        {
            var parameters = new YunDictionary
            {
                {"targetappid",TargetAppId},
                {"username",UserName}
            };
            return parameters;
        }

        public void Validate()
        {
            RequestValidator.ValidateRequired("username", UserName);
        }
    }
}
